﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;

class Program
{

    static void Main()
    {
        BigInteger nFac = 1;
        BigInteger kFac = 1;
        Console.ForegroundColor = ConsoleColor.Yellow;
        Console.WriteLine("4. Write a program that calculates N!/K! for given N and K (1<K<N).\n");
        Console.ForegroundColor = ConsoleColor.White;
        Console.Write("Enter N :");
        int n = int.Parse(Console.ReadLine());
        Console.Write("Enter K :");
        int k = int.Parse(Console.ReadLine());
        if (n < 1 || n < k)
        {
            Console.WriteLine("Incorrect values!");
        }
        else
        {
            for (int i = 1; i <= n; i++)
            {
                nFac *= i;
                if (i <= k)
                {
                    kFac *= i;
                }
            }
            Console.WriteLine("The result is {0}", nFac / kFac);
        }

    }
}

